--
-- Author: shunguo.chen
-- Date: 2016-10-17 15:06:34
--
-- RewardInvestVo

local fileName = string.getModeName(...)
local ClassRef = class(fileName)

function ClassRef:ctor(data)
	if data then
		self:init(data)
	end
end

-- int32 id = 1;
-- int32 lv = 2;
-- int32 coins = 3;
-- bool got = 4; // 是否领取过了
function ClassRef:init(data)
	self.id = data.id
	self.lv = data.lv or 1
	self.coins = data.coins or 0
	self.got = data.got or false

	self.able = false
end

function ClassRef:setConf(conf)
	-- dump(conf, "conf")
	self._conf = conf
	self.icon = "art/item_icon/" .. conf.icon .. ".png"
end

function ClassRef:setGot(b)
	self.got = b
end

function ClassRef:setAble(b)
	self.able = b
end

function ClassRef:isLevAble()
	return self.lv <= UD.player.level
end

function ClassRef:canGetReward()

end

return ClassRef